package com.lg.erp.service.impl.jml;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lg.erp.entity.jml.TDepartment;
import com.lg.erp.mapper.jml.TDepartmentMapper;
import com.lg.erp.service.jml.ITDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jml
 * @since 2021-04-12
 */
@Service
public class TDepartmentServiceImpl extends ServiceImpl<TDepartmentMapper, TDepartment> implements ITDepartmentService {

    @Autowired
    private TDepartmentMapper departmentMapper;
    @Override
    public IPage<TDepartment> selectDepartmentByPage(Page<TDepartment> page) {
        return departmentMapper.selectDepartmentByPage(page);
    }

    @Override
    public List<TDepartment> findAllDepartment() {
        return departmentMapper.selectAllDepartment();
    }

    @Override
    public TDepartment selectById(String id) {
        return departmentMapper.selectById(id);
    }

    @Override
    public TDepartment selectByName(String dName) {
        return departmentMapper.selectByName(dName);
    }

    @Override
    public List<TDepartment> selectAll() {
        return departmentMapper.selectAll();
    }
}
